home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / clipper / nfpat1.zip / ORIGIN.C < prev    next >
C/C++ Source or Header  |  1992-11-09  |  2KB  |  71 lines

  1. /*
  2.  * File......: ORIGIN.C 
  3.  * Author....: Steve Larsen
  4.  * CIS ID....: 76370,1532
  5.  * Date......: $Date:   09 Nov 1992 22:35:52  $
  6.  * Revision..: $Revision:   1.1  $
  7.  * Log file..: $Logfile:   C:/nanfor/src/origin.c_v  $
  8.  *
  9.  * This is an original work by K. Stephan Larsen and is placed in the
  10.  * public domain.
  11.  *
  12.  * Modification history:
  13.  * ---------------------
  14.  *
  15.  * $Log:   C:/nanfor/src/origin.c_v  $
  16.  * 
  17.  *    Rev 1.1   09 Nov 1992 22:35:52   GLENN
  18.  * Function was inadvertently named origin() instead of ft_origin() when
  19.  * it went from an .asm to a .c file.  Renamed it back to ft_origin().
  20.  * 
  21.  *    Rev 1.0   03 Oct 1992 02:13:54   GLENN
  22.  * Initial revision.
  23.  *
  24.  */
  25.  
  26. #include "extend.h"
  27.  
  28. /* $DOC$
  29.  * $FUNCNAME$
  30.  *    FT_ORIGIN()
  31.  * $CATEGORY$
  32.  *    Environment
  33.  * $ONELINER$
  34.  *    Report the drive, path and filename of the current program
  35.  * $SYNTAX$
  36.  *    FT_ORIGIN() -> cString
  37.  * $ARGUMENTS$
  38.  *    None
  39.  * $RETURNS$
  40.  *    A string containing the full drive/directory/filename of
  41.  *    the currently executing file.
  42.  * $DESCRIPTION$
  43.  *    Often users will install multiple copies of application software,
  44.  *    especially on networks and in situations where the user is trying
  45.  *    to get around a copy protection scheme.
  46.  *
  47.  *    This function enables you to learn the name and source location
  48.  *    of the currently executing file, so that you may take whatever
  49.  *    action you need to.
  50.  *
  51.  *    Requires DOS v3.xx and above.
  52.  * $EXAMPLES$
  53.  *    cMyFile := FT_ORIGIN()
  54.  *
  55.  *    IF cMyFile <> "C:\APPDIR\MYFILE.EXE"
  56.  *       ?"Incorrect startup file.  Please remove/rename and start again"
  57.  *       QUIT
  58.  *    ENDIF
  59.  * $INCLUDE$
  60.  *    extend.h
  61.  * $SEEALSO$
  62.  *    FT_WHEREIS() FT_TREE()
  63.  * $END$
  64.  */
  65.  
  66. CLIPPER ft_origin( void )
  67. {
  68.    extern char **__argv;
  69.    _retc(  *__argv  );
  70. }
  71.